package thread.demo.queue;

import java.util.concurrent.ArrayBlockingQueue;

public class ArrayBlockingQueue_Put {
  public static void main(String[] args) throws InterruptedException {
    ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<>(2);
    
    queue.put(1);
    queue.put(2);
    
    // 使用 put方法，一旦出现了队列满了后，会一直处于等待状态
    queue.put(3);
  }
}
